<div class="ui-g border-spe-left" style="height:100%">
    <!--输入文书-->
    <div class="ui-g-8 ui-widget-content border-spe-right dynamic-form-container">
        <fb-dynamic-form [assemblies]="assemblies" [mode]="2"></fb-dynamic-form>
    </div>

    <!-- 输出文书 -->
    <div class="ui-g-8 ui-widget-content border-spe-right print-form-container" style="display:none;">
        <iframe src="/assets/other/pdfjs/viewer.html" style="width:100%; height:100%;"></iframe>
    </div>
    <!-- 文书下载项 -->
    <div class="ui-g-4 formbuilder-repository-download">
        <p-panel header="从仓库下载文书" [style]="{'height':'120%', 'margin-left':'-1px', 'margin-top':'-1px'}">

            <div class="ui-g-12 ui-g ui-fluid">
                <div class="ui-g-4">表单名称
                    <span style="color:red;">*</span>
                </div>
                <div class="ui-g-8">
                    <input pInputText type="text" [(ngModel)]="formName" style="width:100%" />
                </div>
            </div>
            <div class="ui-g-12 ui-g ui-fluid">
                <div class="ui-g-4">所属业务<span style="color:red;">*</span></div>
                <div class="ui-g-8">
                    <p-dropdown [options]="bizs" [(ngModel)]="selectedBiz" [style]="{'width':'100%'}"
                        (onChange)="bizChange($event)" placeholder="业务类型" [filter]="bizs.length > 5"
                        optionLabel="label"></p-dropdown>
                </div>
            </div>
            <div class="ui-g-12 ui-g ui-fluid">
                <div class="ui-g-4">所属过程<span style="color:red;">*</span></div>
                <div class="ui-g-8">
                    <p-dropdown [options]="procs" [(ngModel)]="selectedProc" [style]="{'width':'100%'}"
                        placeholder="业务流程" [filter]="procs.length > 1" [required]="true" emptyFilterMessage="无数据"
                        optionLabel="label"></p-dropdown>
                </div>
            </div>
            <!-- 切换输入/输出文书-->
            <div class="ui-g-12 ui-g ui-fluid">
                <div class="ui-g-6">
                    <p-button icon="fa fa-exchange" label="切换输入/输出文书" style="width:100%" (click)="exchange()">
                    </p-button>
                </div>
                <div class="ui-g-6">
                    <p-button icon="fa fa-times" class="ui-button-danger" label="从仓库移除" style="width:100%"
                        (click)="removeRepo()"></p-button>
                </div>
            </div>
            <div class="ui-g-12 ui-g ui-fluid">
                <p-button icon="fa fa-cloud-download" label="文书下载" style="width:100%" (click)="download()"></p-button>
            </div>
        </p-panel>
    </div>
</div>

<p-confirmDialog #cd>
    <p-footer>
        <button type="button" pButton icon="fa fa-close" label="取消" (click)="cd.reject()"></button>
        <button type="button" pButton icon="fa fa-check" label="确定" (click)="cd.accept()"></button>
    </p-footer>
</p-confirmDialog>